﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UIT.Controls;

namespace UIT
{
    public abstract class ControlRenderer<T> : IControlRenderer<T>
        where T : class,IControl
    {
        #region IControlRenderer Members

        public virtual void Render(IControl control)
        {
            Render(control as T);
        }

        #endregion

        #region IRenderer Members

        public RendererManager Manager
        {
            get;
            private set;
        }

        public virtual void Initialize(RendererManager manager, object userObject)
        {
            Manager = manager;
        }

        #endregion

        #region IRenderer<T> Members

        public abstract void Render(T control);

        #endregion
    }
}
